package main

import "project_0611/socket"

func main() {
	//redis := useRedis.RedisClient{Host:"192.168.1.133", Port:6379, Db:1, Password:"th1515h@1t0n"}
	//redis.Connect()
	//redis.Set("DeviceID", "6022000023")
	//v, _ := redis.GetInt("DeviceID")
	//fmt.Println(v)
	//va, _ := redis.GetStr("DeviceID")
	//fmt.Println(va)
	//redis.SetHash("DICT", "KEY", "value-hello")
	//val, _ := redis.GetHash("DICT", "KEY")
	//fmt.Println(val)

	server := socket.TCPServer{}
	server.Listen("127.0.0.1", 4001, 5)
	go server.Accept(socket.DealClient)
	client := socket.TCPClient{}
	client.Connect("127.0.0.1", 4001)
	client.Send("hello")
	client.Recv(1024)
}
